<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>表单修饰符</title>
		
	</head>
	<div id="app">
		<!-- 语法:
		.number 只能输入数值类型
		.trim   去除左右空格
		.lazy   离焦事件才触发  离焦：选择不在框里
		-->
		<h3>数据展现:{{age}}</h3>
		年龄：<input type="text" v-model.number="age" />
		<button @keyup="age++" @click="age++">增加</button>
		<button @click="addNum()">增加2</button>
		 <hr />
		 用户输入的长度: {{name.length}} <br>
		 用户名: <input type="text" v-model.trim="name" />
		<hr />
		展现数据lazy~~{{msg}}  <br>
		<input type="text" v-model.lazy="msg"/>
	</div>
	<body>
		<script src="../js/vue.js" ></script>
		<script>
			const APP=new Vue({
				el: "#app",
				data: {
				age: 17,
				name: "",
				msg: "",
				},
				methods:{
					addNum(){
						this.age++
					}
				}
			})
		</script>
	</body>
</html>
